package com.lse_api.service.impl;

import com.lse_api.entity.GroupUser;
import com.lse_api.mapper.GroupUserMapper;
import com.lse_api.service.GroupUserService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

/**
 * <p>
 * 项目组成员 服务实现类
 * </p>
 *
 * @author 祁雪
 * @since 2020-05-11
 */
@Service
public class GroupUserServiceImpl extends ServiceImpl<GroupUserMapper, GroupUser> implements GroupUserService {

    @Resource
    private GroupUserMapper mapper;

    @Override
    public boolean removeByGroupAndUser(String userId, String groupId) {
        return mapper.removeByGroupAndUser(userId, groupId) > 0;
    }

    @Override
    public List<GroupUser> getUserListByGroup(String groupId) {
        return mapper.getUserListByGroup(groupId);
    }
}
